# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=apk-exporter
pkgver=0.1.1
pkgrel=0
pkgdesc="Prometheus exporter for apk-tools"
url="https://codeberg.org/fossdd/apk-exporter"
arch="noarch"
license="Unlicense"
depends="
	python3
	py3-prometheus-client
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/fossdd/apk-exporter/archive/$pkgver.tar.gz"
options="!check" # no tests
builddir="$srcdir/$pkgname"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
b3c166ef57af49800d46df22f9dcb7f81bb59a7cb44dfc6773ba7464ae63d211448f800391df098065e7906f654101cde0c6ade965e57a1d077aa368741ce647  apk-exporter-0.1.1.tar.gz
"
